package puntaelena.graphsupport;

public class FacilitiesGraph extends Graph {
	private double[] facilitiesPrices;

	private int citiesCount;
	private int facilitiesCount;

	public FacilitiesGraph(int citiesCount, int facilitiesCount) {
		super(citiesCount + facilitiesCount);
		this.citiesCount = citiesCount;
		this.facilitiesCount = facilitiesCount;
		facilitiesPrices = new double[facilitiesCount];
	}

	public double getInfPrice() {
		return getInfEdgeValue();
	}

	public double[] getFacilitiesPrices() { 
		return facilitiesPrices;
	}

	public int getCitiesCount() {
		return citiesCount;
	}

	public int getFacilitiesCount() {
		return facilitiesCount;
	}

	public double getFSEdge(int city, int facility) {
		return getAdjacentMatrixArr()[city][facility + citiesCount];
	}

	public void setFSEdge(int city, int facility, double value) {
		getAdjacentMatrixArr()[city][facility + citiesCount] = value;
	}

	public boolean existsFCEdge(int city, int facility) {
		return existsEdge(city, facility + citiesCount);
	}
}
